DevJourney

Python/VIT/sem-1/ex-11/3. Key and Value where Value is square of Key/Key and Value where Value is square of Key.py

d={}
dMini={}

for i in range(15):
    dMini.clear
    j=i+1
    dMini.setdefault(j,j**2)
    d.update(dMini)
    
print(d)
View on GitHub